package thread;

public class Threaddemo8 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        System.out.println("start之前的存活"+t.isAlive());
        t.start();
        System.out.println("start之后的存活"+t.isAlive());
        Thread.sleep(2000);
        System.out.println("2000ms之后的存活"+t.isAlive());

    }
}
